package edu.androidecs.condescendingquiz;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.View;

public class LevelActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_level);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.level, menu);
		return true;
	}
	
	public void onLevel1(View v) {
		QuizActivity.curQuizNumber=0;
		startQuiz();
	}
	
	public void onLevel2(View v) {
		QuizActivity.curQuizNumber=1;
		startQuiz();
	}
	
	public void onLevel3(View v) {
		QuizActivity.curQuizNumber=2;
		startQuiz();
	}
	
	public void onLevel4(View v) {
		QuizActivity.curQuizNumber=3;
		startQuiz();
	}
	
	public void onLevel5(View v) {
		QuizActivity.curQuizNumber=4;
		startQuiz();
	}
	
	public void onLevel6(View v) {
		QuizActivity.curQuizNumber=5;
		startQuiz();
	}
	
	public void onLevel7(View v) {
		QuizActivity.curQuizNumber=6;
		startQuiz();
	}
	
	public void onLevel8(View v) {
		QuizActivity.curQuizNumber=7;
		startQuiz();
	}
	
	public void onLevel9(View v) {
		QuizActivity.curQuizNumber=8;
		startQuiz();
	}
	
	public void onLevel10(View v) {
		Log.i("CondescendingQuiz", "Attempting to start level 10.");
		QuizActivity.curQuizNumber=9;
		startQuiz();
	}
	
	public void startQuiz()
	{
		Intent startQuizIntent=new Intent(this, QuizActivity.class);
		
		startActivity(startQuizIntent);
	}

}
